package com.yizhuoyan.his.ao;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
public class ModifyRegistrationLevelAo {

    /**
     * 号别编码
     */
    @NotBlank(message = "挂号级别编码不能为空")
    @Length(max = 16,message = "挂号级别编码长度不能超过{max}")
    @Pattern(regexp = "[\\w-]+",message ="挂号级别编码只能是字母数字和下划线,中横杠")
    private String code;
    /**
     * 号别名称
     */
    @Length(min = 4,max = 16,message = "挂号别名长度必须在{min}-{max}之间")
    @Pattern(regexp = "[\u4e00-\u9fa5\\w]+",message = "挂号别名只能是中文")
    private String name;
    /**
     * 显示顺序号
     */
    @Length(min = 2,max = 16,message = "顺序号长度必须在{min}-{max}之间")
    @Pattern(regexp = "[ ^\\d+$]+",message = "顺序号只能是正整数")
    private Integer showOrder;
    /**
     * 挂号费
     */
    @Length(min = 2,max = 16,message = "费用长度必须在{min}-{max}之间")
    @Pattern(regexp = "[ ^\\d+$]+",message = "费用只能是正整数")
    private Integer fee;


}
